namespace MvcEnrollment.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class deletePrice : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("dbo.Price", "courseID", "dbo.Course");
            DropIndex("dbo.Price", new[] { "courseID" });
            DropTable("dbo.Price");
        }
        
        public override void Down()
        {
            CreateTable(
                "dbo.Price",
                c => new
                    {
                        ID = c.Int(nullable: false, identity: true),
                        courseID = c.Int(nullable: false),
                        courseType = c.String(),
                        fullPrice = c.Decimal(precision: 18, scale: 2),
                        monthPrice = c.Decimal(precision: 18, scale: 2),
                        monthDuration = c.Int(),
                        monthDeposit = c.Decimal(precision: 18, scale: 2),
                        weekPrice = c.Decimal(precision: 18, scale: 2),
                        weekDuration = c.Int(),
                        weekDeposit = c.Decimal(precision: 18, scale: 2),
                        description = c.String(),
                    })
                .PrimaryKey(t => t.ID);
            
            CreateIndex("dbo.Price", "courseID");
            AddForeignKey("dbo.Price", "courseID", "dbo.Course", "ID", cascadeDelete: true);
        }
    }
}
